home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / CIRCLE.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  615b  |  19 lines

  1. ' CIRCLE.BAS
  2. ' This program displays the circumference of a circle when
  3. '   the radius is supplied by the user.
  4.  
  5. CONST PI# = 3.141592654#              ' declare constant
  6.  
  7. CLS                                   ' clear screen
  8.  
  9. PRINT "This program calculates the circumference of a circle ";
  10. PRINT "from its radius."
  11. PRINT                                 ' get input from user
  12. INPUT "Enter the radius of the circle:  ", radius!
  13.  
  14. circum! = 2 * PI# * radius!           ' calculate circumference
  15.  
  16. PRINT                                 ' print result
  17. PRINT "The circumference of the circle is"; circum!
  18.  
  19.